package com.ttms.service.impl;

import com.ttms.dao.SaleDao;
import com.ttms.dao.impl.SaleDaoImpl;
import com.ttms.pojo.Sale;
import com.ttms.service.SaleService;

import java.util.List;

public class SaleServiceImpl implements SaleService {
    SaleDao saleDao = new SaleDaoImpl();

    @Override
    public int createSale(Sale sale) {
        return saleDao.addSale(sale);
    }

    @Override
    public int update(Sale sale) {
        return saleDao.updateSale(sale);
    }

    @Override
    public Sale querySaleByUserId(int user_id) {
        return saleDao.querySaleByUserId(user_id);
    }
}
